package cn.appsys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.appsys.dao.UserMapper;
import cn.appsys.pojo.AppCategory;
import cn.appsys.pojo.AppInfo;
import cn.appsys.pojo.DataDictionary;
import cn.appsys.pojo.GetList;
import cn.appsys.pojo.Paging;
import cn.appsys.pojo.User;
import cn.appsys.tools.Constants;

@Service("userService")
public class UserServiceImpl implements UserService {

	@Autowired
	UserMapper userMapper;
	
	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	
	@Override
	public User login(String userCode) {
		// TODO Auto-generated method stub
		return userMapper.login(userCode);
	}

	@Override
	public List<GetList> getList(int pages) {
		Paging paging=new Paging();
		paging.setPagesize(Constants.PAGING_SIZE);
		paging.setPages(pages);
		return userMapper.getList(paging);
	}
	

	@Override
	public List<DataDictionary> getList_status() {
		return userMapper.getList_status();
	}

	@Override
	public List<DataDictionary> getList_flatform() {
		return userMapper.getList_flatform();
	}

	@Override
	public List<AppCategory> getList_category1() {
		return userMapper.getList_category1();
	}

	@Override
	public List<AppCategory> getList_category2(String pid) {
		return userMapper.getList_category2(pid);
	}

	@Override
	public int getCheck_apk(String APKName) {
		return userMapper.getCheck_apk(APKName);
	}

	@Override
	public int setAppinfo(AppInfo appinfo) {
		return userMapper.setAppinfo(appinfo);
	}
	
}
